package com.itheima.text2;

public class Text6 {
    public static void main(String[] args) {
        userInter1(new Inter1() {
            @Override
            public double method(double a, double b) {
                return a + b;
            }
        });
        userInter1((a, b) -> a - b);

    }

    public static void userInter1(Inter1 i) {
        double result = i.method(11.2, 12.5);
        System.out.println(result);
    }
}


interface Inter1 {
    double method(double a, double b);
}
